Skip to content

Conversation

@ldorau
Copy link
Contributor

@ldorau ldorau commented Nov 20, 2025

Add UR_L0_V2_DISABLE_ZE_LAUNCH_KERNEL_WITH_ARGS debugging environment variable to disable calling ZeCommandListAppendLaunchKernelWithArguments().

@ldorau ldorau force-pushed the Add_UR_L0_V2_DISABLE_ZE_LAUNCH_KERNEL_WITH_ARGS_debugging_variable branch from 876f5c0 to e96c7cf Compare November 20, 2025 13:53
@ldorau ldorau force-pushed the Add_UR_L0_V2_DISABLE_ZE_LAUNCH_KERNEL_WITH_ARGS_debugging_variable branch from e96c7cf to ce0487c Compare November 20, 2025 15:13
@ldorau ldorau requested a review from pbalcer November 20, 2025 15:16
@ldorau ldorau force-pushed the Add_UR_L0_V2_DISABLE_ZE_LAUNCH_KERNEL_WITH_ARGS_debugging_variable branch from ce0487c to 74c718b Compare November 20, 2025 15:26
@ldorau
Copy link
Contributor Author

ldorau commented Nov 20, 2025

CI failure (UR L0v2) is caused by #20683

Add UR_L0_V2_DISABLE_ZE_LAUNCH_KERNEL_WITH_ARGS debugging environment variable
to disable calling ZeCommandListAppendLaunchKernelWithArguments().

Signed-off-by: Lukasz Dorau <[email protected]>
@ldorau ldorau requested a review from kswiecicki November 21, 2025 09:23
@ldorau
Copy link
Contributor Author

ldorau commented Nov 21, 2025

@intel/dpcpp-doc-reviewers please review

| Environment variable | Values | Description | Adapter Support |
| -------------------- | ------ | ----------- | --------------- |
| `UR_L0_V2_FORCE_DISABLE_COPY_OFFLOAD` | Integer | By default, copy operations submitted to any queue can be offloaded to dedicated copy engines. Setting this variable instructs the driver to keep all copy operations on the engine behind the original queue. The default value is 0. | V2 |
| `UR_L0_V2_DISABLE_ZE_LAUNCH_KERNEL_WITH_ARGS` | Integer | By default, ZeCommandListAppendLaunchKernelWithArguments() will be called when available and possible. Setting this variable instructs the adapter to not call ZeCommandListAppendLaunchKernelWithArguments() and use the old path using ZeCommandListAppendLaunchKernel(). The default value is 0. | V2 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `UR_L0_V2_DISABLE_ZE_LAUNCH_KERNEL_WITH_ARGS` | Integer | By default, ZeCommandListAppendLaunchKernelWithArguments() will be called when available and possible. Setting this variable instructs the adapter to not call ZeCommandListAppendLaunchKernelWithArguments() and use the old path using ZeCommandListAppendLaunchKernel(). The default value is 0. | V2 |
| `UR_L0_V2_DISABLE_ZE_LAUNCH_KERNEL_WITH_ARGS` | Integer | By default, `zeCommandListAppendLaunchKernelWithArguments()` will be called when available and possible. Setting this variable instructs the adapter to not call `zeCommandListAppendLaunchKernelWithArguments()` and use the old path using `zeCommandListAppendLaunchKernel()`. The default value is 0. | V2 |

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

| Environment variable | Values | Description | Adapter Support |
| -------------------- | ------ | ----------- | --------------- |
| `UR_L0_V2_FORCE_DISABLE_COPY_OFFLOAD` | Integer | By default, copy operations submitted to any queue can be offloaded to dedicated copy engines. Setting this variable instructs the driver to keep all copy operations on the engine behind the original queue. The default value is 0. | V2 |
| `UR_L0_V2_DISABLE_ZE_LAUNCH_KERNEL_WITH_ARGS` | Integer | By default, ZeCommandListAppendLaunchKernelWithArguments() will be called when available and possible. Setting this variable instructs the adapter to not call ZeCommandListAppendLaunchKernelWithArguments() and use the old path using ZeCommandListAppendLaunchKernel(). The default value is 0. | V2 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "will be called when available and possible" mean? When is it available but it isn't possible to call it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant this:
https://github.com/ldorau/llvm/blob/Add_UR_L0_V2_DISABLE_ZE_LAUNCH_KERNEL_WITH_ARGS_debugging_variable/unified-runtime/source/adapters/level_zero/v2/command_list_manager.cpp#L1262L1266

  bool RunNewPath =
      !DisableZeLaunchKernelWithArgs && KernelWithArgsSupported &&
      (!cooperativeKernelLaunchRequested ||
       (cooperativeKernelLaunchRequested && CooperativeCompatible));
  if (RunNewPath) {

but I think we can remove when available and possible and leave just: By default, zeCommandListAppendLaunchKernelWithArguments() will be called - is it OK for you?

Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wording of the env var is awfully technical, but I suppose it's no different than some of the others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants